Database systems allow for storage of and rapid access to large sets of information. Database systems have become an important part of organizing information within companies. Additionally, database systems have made available large amounts of information, such as news stories, through web sites on the Internet. Data in a database system may be selected and fetched through query statements executed by the database system. After a query is executed, a set of data is returned to the requester, if the data is available. For example, in a database system storing patient records a query may be of the type: “find all drugs patient X is allergic to.”
Database systems may be accessed by multiple users through multiple interfaces. For example, the database system storing patient information may be accessible to medical personnel inside the hospital, patients from their home, and medical insurance companies. Each of these users access the database through an interface, such as a Java database connector (JDBC). When the user requests data from the database system, the interface establishes a database connection and retrieves the data from the database. However, the interface does not conventionally close the database connection immediately after the data is downloaded.
Database connections are often left open to improve the performance of later requests for data from the database system. By leaving the database connection open, the overhead of establishing the database connection is eliminated in future data requests. Database connections are instead closed after a specified amount of time or after the connection has been idle for a certain period of time. For example, the connection may be closed after twenty minutes.
Changes to the structure of the database system may not be performed while database connections to the database system are open. For example, if a database system administrator desires to add a new column for phone number to a table listing patients in the database system, the database system administrator is unable to add the column until all database connections are closed. When large numbers of users are accessing a database system, such as in a hospital, there are only rare moments when no database connections are open. For example, the database system may wait one or more days to execute an alteration waiting for database connections to close.
One conventional solution to allow administrators to alter the database system is to shut down the database system. When the database system is shut down all database connections are closed. Then, the administrator may alter the database system. However, shutting down the database system makes data unavailable to users. In certain scenarios, such as a hospital, data must be made available 24 hours per day and 365 days per year. Additionally, restarting the database system may not be as simple as turning the database system back on. Errors may occur from the shut down and re-start creating additional delay time in making the database system available again. Further, the staff responsible for shutting down and restarting the database system is often part of a different organization than the staff responsible for designing and altering the database system.